Skip to content

Build your first model, from images to results ​

A model learns from examples: images and the tag each one deserves. This guide takes the whole path once, with glass jars that are ok, stained or broken: create a dataset, upload the images, label the ones without a tag, train a model and read how well it does. Each step has a guide of its own that goes further.

What you will learn

  • The steps from a few images to a trained model
  • What the platform needs before it can train
  • How to read whether the model is good

Before you start

You need images of what you want to inspect, at least 10 of each kind. Training spends the project's tokens: the platform shows the price before you start.

1. Create a dataset ​

In «Datasets», click «New dataset». Type a name and choose the type of inspection: here «Classification», because each jar gets one tag, ok, stained or broken. Choose the right dataset type helps you decide.

Create a dataset

2. Open it ​

Click «Create». The dataset appears in the list: click it to open it.

3. Upload the images ​

Go to the «Upload» tab and click «Select Files». A ZIP with one folder per tag is the quickest start: ok/, stained/ and broken/ become tags and their images arrive labeled. Images in a folder named 0 arrive without a tag, and the upload counts the images at the root of the ZIP there too: here «0 (3)», under «Tags directories», are three jars without a tag. Upload images to a dataset shows the other ways.

Upload the images

4. Send them ​

Click «Upload». The summary counts the images uploaded.

Send them

5. Find the images without a tag ​

Click «Labeling» to see the images. On the right, every tag counts its images, and «Unclassified» shows the ones that still need a tag: here the three jars the upload listed under «0».

Find the images without a tag

6. Give each one its tag ​

Click the first image to open it in the editor. Each tag has a number in the panel on the right: press it to give the image that tag, and D to go to the next image. Label images for classification explains the editor.

Give each one its tag

7. Start a training ​

Click «Exit» to go back to the dataset and open the «Models» tab. Click «Train a new model» and choose «Production training»: a page with four sections and a summary on the right.

Start a training

8. Name the model ​

The name comes from the dataset; change it to one that tells this model apart from the next ones, such as a version number. Up to 32 characters: letters, numbers and underscores.

Name the model

9. Check the tags it will learn ​

«Images and tags» lists the tags the model will learn, with their images. A tag needs at least 10 images to be trained: «stained» has eight, so it is left out and this model will tell ok from broken jars. Upload more stained jars and train again to add it.

Check the tags it will learn

10. Choose the training time ​

In «Training configuration», the platform has chosen the task and a model for the dataset; keep them. Move «Training time» to set how long it trains: a longer training can learn more and costs more tokens. Five minutes, the shortest, is enough for a first try with a few dozen images.

Choose the training time

11. Read the summary ​

The summary on the right sums up the training: images, tags, model and time. It says «Ready to train» when nothing is missing, or lists what is. Below, the machine it will run on and its price in tokens, with what the project has left this period.

Read the summary

12. Train ​

Click «Train». The platform offers to send an email when the training ends: type one or more addresses, or leave the field empty.

Train

13. Launch it ​

Click «Train» again. The training starts in the cloud. First the page says «Preparing environment»: keep the window open until it changes, as the page asks. Then the training waits for a machine, trains for the time you chose and is tested; from then on you can leave the page and keep working. Follow a training and understand how it ended shows what you see meanwhile.

Launch it

14. Open the results ​

When the training ends, the page says «Training complete». Click «See results».

15. Read the scores ​

The model was tested on images it did not learn from. «Precision» says how often it is right when it calls an image a class; «Recall», how many of the images of each class it finds; «F1 Score» combines both. The closer to 100 %, the better.

Read the scores

16. See where it goes wrong ​

The confusion matrix compares the real class of each test image (rows) with the class the model predicted (columns): the diagonal is right, the rest are mistakes. Click a cell to see its images. Read the results of a classification model goes through this screen, and Find where a model fails and fix it shows what to do with the mistakes.

See where it goes wrong

Next steps ​

Recorded on Rosepetal release 1.8.15.